﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 数组Array.Sort__排序
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] a = new int[] { 2, 4, 3, 2, 5 };
            Console.WriteLine ("排序前的数组");
            Console.WriteLine(a[0].ToString() + " " + a[1].ToString() + " " + a[2].ToString() + " " + a[3].ToString() + " " + a[4].ToString() + " ");
            Array.Sort(a);      //排序
            Console.WriteLine();
            Console.WriteLine("排序后的数组");
            Console.Write(a[0].ToString() + " " + a[1].ToString() + " " + a[2].ToString() + " " + a[3].ToString() + " " + a[4].ToString() + " ");
            Console.ReadLine();


        }
    }
}
